#ifndef CLIPBOARDWATCHER_H
#define CLIPBOARDWATCHER_H

#include <QObject>
#include <QTimer>


#include <QKeyEvent>
namespace utils {
class ClipboardWatcher : public QObject {
	Q_OBJECT

public:
	explicit ClipboardWatcher(QObject *parent = nullptr);

	void setClipboardData(const QString &data);
	void startTimer();

	signals:
	void clipboardCleared();

protected:
	bool eventFilter(QObject *obj, QEvent *event) override;

	private slots:
		void clearClipboard();

private:
	QString generateHash(const QString &data);

	QTimer timer;
	QString clipboardHash;
};
}

#endif // CLIPBOARDWATCHER_H